<?php
/* Smarty version 3.1.29, created on 2016-09-05 13:30:44
  from "/Applications/MAMP/htdocs/php/Smarty/myweb/templates/index.tpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_57cd0304858d71_66217764',
  'file_dependency' => 
  array (
    '4d456f09f5445ac14090013fd6615659dfbd1203' => 
    array (
      0 => '/Applications/MAMP/htdocs/php/Smarty/myweb/templates/index.tpl',
      1 => 1473053443,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_57cd0304858d71_66217764 ($_smarty_tpl) {
if (!is_callable('smarty_modifier_truncate')) require_once '/Applications/MAMP/htdocs/php/Smarty/myweb/libs/plugins/modifier.truncate.php';
if (!is_callable('smarty_function_hello')) require_once '/Applications/MAMP/htdocs/php/Smarty/myweb/myplugins/function.hello.php';
?>
<html>
    <head>
        <title>Page Title</title>
        <style media="screen">
            body {
                font-size: 12px;
            }
        </style>
    </head>
</body>

<?php
$_smarty_tpl->smarty->ext->configLoad->_loadConfigFile($_smarty_tpl, "global.conf", "color", 0);
?>

<div style="width:<?php echo $_smarty_tpl->smarty->ext->configLoad->_getConfigVariable($_smarty_tpl, 'width');?>
px;background-color:<?php echo $_smarty_tpl->smarty->ext->configload->_getConfigVariable($_smarty_tpl, 'color');?>
">

<h1>Hello <?php echo $_smarty_tpl->tpl_vars['name']->value;?>
</h1><p>welcome to home!</p>


<?php echo $_GET['username'];?>

</div>


<h1>Hello <?php echo mb_strtoupper($_smarty_tpl->tpl_vars['name']->value, 'UTF-8');?>
</h1><p>welcome to home!</p>
<h1>Hello <?php echo smarty_modifier_truncate(mb_strtoupper($_smarty_tpl->tpl_vars['name']->value, 'UTF-8'),2);?>
</h1><p>welcome to home!</p>


<?php echo smarty_function_hello(array('line'=>"5",'content'=>"hello"),$_smarty_tpl);?>



<?php $_smarty_tpl->smarty->_cache['tag_stack'][] = array('world', array('line'=>"5")); $_block_repeat=true; echo smarty_block_world(array('line'=>"5"), null, $_smarty_tpl, $_block_repeat);while ($_block_repeat) { ob_start();?>

sdadasdasdadasdasd
asdas
das
d
sd
asd
as
da
<?php $_block_content = ob_get_clean(); $_block_repeat=false; echo smarty_block_world(array('line'=>"5"), $_block_content, $_smarty_tpl, $_block_repeat);  } array_pop($_smarty_tpl->smarty->_cache['tag_stack']);?>



<?php $_smarty_tpl->tpl_vars["one"] = new Smarty_Variable("hello world", null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, "one", 0);
$_smarty_tpl->tpl_vars["two"] = new Smarty_Variable("this is two", null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, "two", 0);
$_smarty_tpl->tpl_vars['three'] = new Smarty_Variable("aaaaaaaaaa", null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'three', 0);?>
<p><?php echo $_smarty_tpl->tpl_vars['three']->value;?>
</p>



<?php $_smarty_tpl->tpl_vars['var'] = new Smarty_Variable(1, null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'var', 0);
if ($_smarty_tpl->tpl_vars['var']->value == 2) {?>
    if is succeed.
    <?php } elseif ($_smarty_tpl->tpl_vars['var']->value == 1) {?>
        elseif is succeed.
<?php }?>



<?php
$_smarty_tpl->tpl_vars['var'] = new Smarty_Variable;$_smarty_tpl->tpl_vars['var']->step = 2;$_smarty_tpl->tpl_vars['var']->total = (int) min(ceil(($_smarty_tpl->tpl_vars['var']->step > 0 ? 5+1 - (1) : 1-(5)+1)/abs($_smarty_tpl->tpl_vars['var']->step)),3);
if ($_smarty_tpl->tpl_vars['var']->total > 0) {
for ($_smarty_tpl->tpl_vars['var']->value = 1, $_smarty_tpl->tpl_vars['var']->iteration = 1;$_smarty_tpl->tpl_vars['var']->iteration <= $_smarty_tpl->tpl_vars['var']->total;$_smarty_tpl->tpl_vars['var']->value += $_smarty_tpl->tpl_vars['var']->step, $_smarty_tpl->tpl_vars['var']->iteration++) {
$_smarty_tpl->tpl_vars['var']->first = $_smarty_tpl->tpl_vars['var']->iteration == 1;$_smarty_tpl->tpl_vars['var']->last = $_smarty_tpl->tpl_vars['var']->iteration == $_smarty_tpl->tpl_vars['var']->total;?>
    <?php echo $_smarty_tpl->tpl_vars['var']->value;?>

    <?php }} else { ?>
    forelse is showed
<?php }
?>




<?php $_smarty_tpl->tpl_vars['var1'] = new Smarty_Variable(0, null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'var1', 0);
while ($_smarty_tpl->tpl_vars['var1']->value < 10) {
echo $_smarty_tpl->tpl_vars['var1']->value++;?>
  <br>
<?php }?>




<?php $_smarty_tpl->tpl_vars['arr'] = new Smarty_Variable(array('os'=>'linux','server'=>'apache'), null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'arr', 0);
$_from = $_smarty_tpl->tpl_vars['arr']->value;
if (!is_array($_from) && !is_object($_from)) {
settype($_from, 'array');
}
$__foreach_value_0_saved_item = isset($_smarty_tpl->tpl_vars['value']) ? $_smarty_tpl->tpl_vars['value'] : false;
$__foreach_value_0_saved_key = isset($_smarty_tpl->tpl_vars['key']) ? $_smarty_tpl->tpl_vars['key'] : false;
$_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable();
$_smarty_tpl->tpl_vars['value']->_loop = false;
foreach ($_from as $_smarty_tpl->tpl_vars['key']->value => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
$__foreach_value_0_saved_local_item = $_smarty_tpl->tpl_vars['value'];
?>
    <?php echo $_smarty_tpl->tpl_vars['key']->value;
echo $_smarty_tpl->tpl_vars['value']->value;?>
<br>
<?php
$_smarty_tpl->tpl_vars['value'] = $__foreach_value_0_saved_local_item;
}
if (!$_smarty_tpl->tpl_vars['value']->_loop) {
?>
数组不存在或数组为空
<?php
}
if ($__foreach_value_0_saved_item) {
$_smarty_tpl->tpl_vars['value'] = $__foreach_value_0_saved_item;
}
if ($__foreach_value_0_saved_key) {
$_smarty_tpl->tpl_vars['key'] = $__foreach_value_0_saved_key;
}
?>


<?php $_smarty_tpl->tpl_vars['arr1'] = new Smarty_Variable(array('os','linux','server','apache'), null);
$_smarty_tpl->ext->_updateScope->updateScope($_smarty_tpl, 'arr1', 0);
$__section_one_0_saved = isset($_smarty_tpl->tpl_vars['__smarty_section_one']) ? $_smarty_tpl->tpl_vars['__smarty_section_one'] : false;
$__section_one_0_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['arr1']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_one_0_total = $__section_one_0_loop;
$_smarty_tpl->tpl_vars['__smarty_section_one'] = new Smarty_Variable(array());
if ($__section_one_0_total != 0) {
for ($__section_one_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_one']->value['index'] = 0; $__section_one_0_iteration <= $__section_one_0_total; $__section_one_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_one']->value['index']++){
?>
    
    <h1><?php echo $_smarty_tpl->tpl_vars['arr1']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_one']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_one']->value['index'] : null)];?>
</h1>
<?php
}
}
if ($__section_one_0_saved) {
$_smarty_tpl->tpl_vars['__smarty_section_one'] = $__section_one_0_saved;
}
?>
</body>
</html>
<?php }
}
